package com.wbsxch.shiro.service.impl;

import com.wbsxch.shiro.domain.Permission;
import com.wbsxch.shiro.mapper.PermissionMapper;
import com.wbsxch.shiro.service.PermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public int insert(Permission record) {
        return permissionMapper.insert(record);
    }

    @Override
    public int delete(Long id) {
        return permissionMapper.delete(id);
    }

    @Override
    public int update(Permission record) {
        return permissionMapper.update(record);
    }

    @Override
    public List<Permission> selectAll(Permission record) {
        return permissionMapper.selectAll(record);
    }

    @Override
    public Permission selectOne(Long id) {
        return permissionMapper.selectOne(id);
    }
}
